package com.hzhr.iot.device.sdk.constant;

import com.hzhr.iot.core.constant.HttpExceptionCategory;
import com.hzhr.iot.core.constant.ServiceErrors;
import com.hzhr.iot.core.constant.ServiceExceptionCategory;
import org.springframework.http.HttpStatus;
import org.springframework.util.StringUtils;

public enum Device_ErrorsEnum implements ServiceErrors {
    //region RegulatorDevice_MaintenanceCardService
    //region postByRegulatorDeviceId
    REGULATORDEVICE_MAINTENANCECARDSERVICE_POST_BY_REGULATOR_DEVICE_ID_201(201, "验证调压设备的存在性", "调压设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    REGULATORDEVICE_MAINTENANCECARDSERVICE_POST_BY_REGULATOR_DEVICE_ID_202(202, "验证卡片的存在性", "本年度的维护卡已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region RegulatorDevice_MaintenanceCard_ItemService
    //region postByRegulatorDeviceIdAndMaintenanceCardId
    REGULATORDEVICE_MAINTENANCECARD_ITEM_SERVICE_POST_BY_REGULATOR_DEVICE_ID_AND_MAINTENANCE_CARD_ID_201(201, "查询设备维护卡片", "维护卡片不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region putByRegulatorDeviceIdAndMaintenanceCardIdAndId
    REGULATORDEVICE_MAINTENANCECARD_ITEM_SERVICE_PUT_BY_REGULATOR_DEVICE_ID_AND_MAINTENANCE_CARD_ID_AND_ID_201(201, "查询设备维护卡片的选项", "维护卡片的选项不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region RegulatorDevice_InfoCardService
    //region putByRegulatorDeviceIdAndId
    REGULATORDEVICE_INFOCARDSERVICE_PUT_BY_REGULATOR_DEVICE_ID_AND_ID_201(201, "查询信息卡片", "信息卡片不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region RegulatorDevice_InfoCardService
    //region putByRegulatorDeviceIdAndId
    REGULATORDEVICE_MONITOR_ALARMDATASERVICE_GET_201(201, "查询调压设备", "调压设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    REGULATORDEVICE_MONITOR_ALARMDATASERVICE_GET_202(202, "查询调压设备的下的监控设备", "监控设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region RegulatorDevice_Monitor_CommandSendService
    //region post
    REGULATORDEVICE_MONITOR_COMMANDSENDSERVICE_POST_201(201, "查询调压设备", "调压设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    REGULATORDEVICE_MONITOR_COMMANDSENDSERVICE_POST_202(202, "查询监控设备", "监控设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    REGULATORDEVICE_MONITOR_COMMANDSENDSERVICE_POST_203(203, "验证监控设备是否具备发送目标指令的条件", "该监控设备无法进行此操作", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    REGULATORDEVICE_MONITOR_COMMANDSENDSERVICE_POST_204(204, "发送指令", "指令下发异常", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region PressureMonitor1_CollectDataService
    //region get
    PRESSUREMONITOR1_COLLECTDATASERVICE_GET_201(201, "查询压力检测仪", "压力监测仪不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region CollectDevice_CodeService
    //region put
    COLLECTDEVICE_CODE_SERVICE_PUT_201(201, "查询采集设备", "采集设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICE_CODE_SERVICE_PUT_202(202, "验证新采集设备代码", "采集设备代码已经存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region CollectDeviceService
    //region post
    COLLECTDEVICESERVICE_POST_201(201, "验证设备类型", "找不到对应的设备类型", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_POST_202(202, "验证设备代码", "设备代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region put
    COLLECTDEVICESERVICE_PUT_201(201, "判断要更新的采集设备是否在用户的管辖范围内", "采集设备不存在或不在用户的管辖范围内", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_PUT_202(202, "验证采集设备代码的合法性", "采集设备代码已经存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_PUT_203(203, "验证所属公司的合法性", "所属公司不存在或与登录用户的公司不同", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_PUT_204(204, "更新采集设备", "采集设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_PUT_205(205, "验证所属燃气用户的合法性", "所属燃气用户不在登录用户的管辖范围内", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_PUT_206(206, "验证所属部门的合法性", "所属部门不在登录用户的管辖范围内", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_PUT_207(207, "验证所属物联网设备的合法性", "所属物联网设备不在登录用户的管辖范围内", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    //endregion
    //region putValveStatusById
    COLLECTDEVICESERVICE_PUT_VALVE_STATUS_201(201, "当前权限：更新采集设备的阀门状态", "原采集设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region putStatusInfoById
    COLLECTDEVICESERVICE_PUT_STATUS_INFO_201(201, "当前权限：更新采集设备的状态信息", "原采集设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region impl_addFlowMeter
    COLLECTDEVICESERVICE_IMPL_ADD_FLOW_METER_201(201, "查询燃气用户", "燃气用户不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_ADD_FLOW_METER_202(202, "判断流量计和DTU的存在性", "DTU代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_ADD_FLOW_METER_203(203, "判断流量计和DTU的存在性", "流量计代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region impl_setFlowMeter
    COLLECTDEVICESERVICE_IMPL_SET_FLOW_METER_201(201, "查询流量计", "流量计不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_SET_FLOW_METER_202(202, "查询DTU", "DTU不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_SET_FLOW_METER_203(203, "验证新的流量计代码", "流量计代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_SET_FLOW_METER_204(204, "验证新的DTU代码", "DTU代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_SET_FLOW_METER_205(205, "验证新的所属燃气用户", "燃气用户不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region impl_delFlowMeter
    COLLECTDEVICESERVICE_IMPL_DEL_FLOW_METER_201(201, "查询流量计", "流量计不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_DEL_FLOW_METER_202(202, "查询DTU", "DTU不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region impl_addPressureMeter
    COLLECTDEVICESERVICE_IMPL_ADD_PRESSURE_METER_201(201, "系统权限：根据燃气用户代码和部门编号查询“燃气用户_1”，如果“燃气用户_1”不存在，抛出异常“燃气用户不存在”", "燃气用户不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_ADD_PRESSURE_METER_202(202, "系统权限：根据压力监测仪代码查询“压力监测仪物联台账_1”，如果“压力监测仪物联台账_1”不存在，抛出异常“压力监测仪物联台账不存在”", "压力监测仪物联台账不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_ADD_PRESSURE_METER_203(203, "系统权限：根据压力监测仪代码和燃气公司编号查询“压力监测仪采集台账_1”，如果“压力监测仪采集台账_1”存在，抛出异常“压力监测仪代码已存在”", "压力监测仪采集台账已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region impl_setPressureMeter
    COLLECTDEVICESERVICE_IMPL_SET_PRESSURE_METER_201(201, "系统权限：根据压力监测仪编号查询“压力监测仪采集台账_1”，如果“压力监测仪采集台账_1”不存在，抛出异常“压力监测仪采集台账不存在”", "压力监测仪采集台账不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_SET_PRESSURE_METER_202(202, "系统权限：如果压力监测仪代码与“压力监测仪采集台账_1”的代码不同，则根据压力监测仪代码查询“压力监测仪物联台账_1”，如果“压力监测仪物联台账_1”不存在，抛出异常“新的压力检测物联台账不存在”，然后根据压力监测仪代码和燃气公司编号查询“压力监测仪采集台账_2”，如果“压力监测仪采集台账_2”存在，则抛出异常“新的压力监测仪代码已存在”", "新的压力检测物联台账不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_SET_PRESSURE_METER_203(203, "系统权限：如果压力监测仪代码与“压力监测仪采集台账_1”的代码不同，则根据压力监测仪代码查询“压力监测仪物联台账_1”，如果“压力监测仪物联台账_1”不存在，抛出异常“新的压力检测物联台账不存在”，然后根据压力监测仪代码和燃气公司编号查询“压力监测仪采集台账_2”，如果“压力监测仪采集台账_2”存在，则抛出异常“新的压力监测仪代码已存在”", "新的压力监测仪代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_SET_PRESSURE_METER_204(204, "系统权限：如果燃气用户代码和“压力监测仪采集台账_1”的燃气用户代码不同，则根据燃气用户代码和部门编号查询“燃气用户_1”，如果“燃气用户_1”不存在，抛出异常“燃气用户不存在”", "燃气用户不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region impl_delPressureMeter
    COLLECTDEVICESERVICE_IMPL_DEL_PRESSURE_METER_201(201, "系统权限：根据压力监测仪编号查询“压力监测仪采集台账_1”，如“压力监测仪采集台账_1”不存在，抛出异常“压力监测仪采集台账不存在”", "压力监测仪采集台账不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region impl_addBkMeter
    COLLECTDEVICESERVICE_IMPL_ADD_BK_METER_201(201, "以系统用户身份：查询燃气用户，如果燃气用户不存在，抛出异常", "燃气用户不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region impl_setBkMeter
    COLLECTDEVICESERVICE_IMPL_SET_BK_METER_201(201, "以系统用户身份：查询bk表信息，如果bk表不存在则报错", "燃气用户不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_SET_BK_METER_202(202, "以系统用户身份：修改bk表采集台账，如果修改了DTU号或用户号，须查询新的DTU或用户是否存在，如果不存在则报错，否则须关联新的DTU或用户号", "新的燃气用户不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    COLLECTDEVICESERVICE_IMPL_SET_BK_METER_203(203, "以系统用户身份：修改bk表采集台账，如果修改了DTU号或用户号，须查询新的DTU或用户是否存在，如果不存在则报错，否则须关联新的DTU或用户号", "新的DTU不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region putFlowMeterImplInfoById
    COLLECTDEVICESERVICE_PUT_FLOW_METER_IMPL_INFO_BY_ID_201(201, "当前权限：更新流量计实施信息", "原流量计不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region IotDeviceService
    //region post
    IOTDEVICESERVICE_POST_201(201, "验证物联网设备代码的合法性", "物联网设备代码已经存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_POST_202(202, "验证所属公司的合法性", "物联网设备的所属公司与登陆用户的所属公司不同", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_POST_203(203, "如果设备有所属的iot平台，需要在该平台上注册该设备", "如果设备输入oc平台，imei号不能为空", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_POST_204(204, "验证采集设备imei号的合法性", "imei号已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    //endregion
    //region put
    IOTDEVICESERVICE_PUT_201(201, "判断要更新的物联网设备是否在用户的所属公司下", "物联网设备不存在或不在用户的所属公司下", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_PUT_202(202, "验证物联网设备代码的合法性", "物联网设备代码已经存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_PUT_203(203, "验证物联网所属公司的合法性", "物联网所属公司与和登录用户的所属公司不同", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_PUT_204(204, "更新物联网设备", "物联网设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    //endregion
    //region putRegistInfoById
    IOTDEVICESERVICE_PUT_REGIST_INFO_BY_ID_201(201, "如果设备不存在，则报错", "设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_PUT_REGIST_INFO_BY_ID_202(202, "如果更新后的物联网设备编号已存在，则报错", "更新后的物联网设备编号已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    //endregion
    //region putDtuImplInfoById
    IOTDEVICESERVICE_PUT_DTU_IMPL_INFO_BY_ID_201(201, "根据DTU编号查询用户管辖范围内的DTU，如果不存在，抛出异常", "原始DTU不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    //endregion
    //region sellIotDevice
    IOTDEVICESERVICE_SELL_IOT_DEVICE_201(201, "销售物联网设备", "物联网设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_SELL_IOT_DEVICE_202(202, "验证物联网设备的销售状态", "物联网设备已销售", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_SELL_IOT_DEVICE_203(203, "验证物联网设备的设备代码", "物联网设备的设备代码不能为空", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_SELL_IOT_DEVICE_204(204, "验证物联网设备的设备代码", "物联网设备的设备代码在要销售的燃气公司里已经存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    //endregion
    //region putById
    IOTDEVICESERVICE_PUT_BY_ID_201(201, "查询物联网设备", "物联网设备不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    IOTDEVICESERVICE_PUT_BY_ID_202(202, "验证新的物联网设备代码", "物联网设备代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    //endregion
    //endregion

    //region Concentrator
    //region post
    CONCENTRATORSERVICE_POST_201(201, "验证集中器代码", "集中器代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region putById
    CONCENTRATORSERVICE_PUT_BY_ID_201(201, "查询集中器", "集中器不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    CONCENTRATORSERVICE_PUT_BY_ID_202(202, "验证修改信息", "集中器代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region Concentrator_Meter
    //region postByConcentratorId
    CONCENTRATOR_METERSERVICE_POST_BY_CONCENTRATOR_ID_201(201, "查询集中器", "集中器不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    CONCENTRATOR_METERSERVICE_POST_BY_CONCENTRATOR_ID_202(202, "验证表具代码", "表具代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region putByConcentratorIdAndId
    CONCENTRATOR_METERSERVICE_PUT_BY_CONCENTRATOR_ID_AND_ID_201(201, "查询集中器下的表具", "查询集中器下的表具不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    CONCENTRATOR_METERSERVICE_PUT_BY_CONCENTRATOR_ID_AND_ID_202(202, "验证修改信息", "表具代码已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region Concentrator_Command
    //region getByConcentratorId
    CONCENTRATOR_COMMANDSERVICE_GET_BY_CONCENTRATOR_ID_201(201, "验证集中器的存在性", "集中器不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region Concentrator_CommandSend
    //region post
    CONCENTRATOR_COMMANDSENDSERVICE_POST_201(201, "查询集中器", "集中器不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region Concentrator_Meter_Command
    //region getByConcentratorIdAndId
    CONCENTRATOR_METER_COMMANDSERVICE_GET_BY_CONCENTRATOR_ID_AND_ID_201(201, "验证表具的存在性", "表具不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region Concentrator_Meter_CommandSend
    //region post
    CONCENTRATOR_METER_COMMANDSENDSERVICE_POST_201(201, "查询集中器", "集中器不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    CONCENTRATOR_METER_COMMANDSENDSERVICE_POST_202(202, "查询集中器下的表具", "表具不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region Concentrator_Meter_CollectData
    //region getByConcentratorIdAndId
    CONCENTRATOR_METER_COLLECTDATASERVICE_GET_BY_CONCENTRATOR_ID_AND_ID_201(201, "验证表具的存在性", "表具不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region NbMeter
    //region post
    NBMETERSERVICE_POST_201(201, "验证NB物联网表的IMEI号", "IMEI号已存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region put
    NBMETERSERVICE_PUT_201(201, "获取NB物联网表", "NB物联网表不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    NBMETERSERVICE_PUT_202(202, "验证NB物联网表是否在iot平台上完成注册", "该NB物联网表还未在iot平台上完成注册", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //region delete
    NBMETERSERVICE_DELETE_201(201, "判断NB表是否具备删除条件", "该NB物联网表不具备删除条件", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion
    //endregion

    //region NbMeter_Sell
    //region post
    NBMETER_SELLSERVICE_POST_201(201, "获取NB表", "NB表不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    NBMETER_SELLSERVICE_POST_202(202, "验证购买公司的合法性", "购买公司不合法", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    NBMETER_SELLSERVICE_POST_203(203, "验证NB表是否具备销售条件", "NB表已经销售，无法继续销售", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),
    NBMETER_SELLSERVICE_POST_204(204, "验证NB表是否具备销售条件", "NB表没有代码，无法销售", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN),

    //endregion

    //endregion

    //region ImplRecordService
    //region put
    IMPLRECORDSERVICE_PUT_201(201, "查询实施档案", "实施档案不存在", ServiceExceptionCategory.BUSINESS_EXCEPTION, HttpExceptionCategory.CLIENT_EXCEPTION, HttpStatus.FORBIDDEN);
    //endregion
    //endregion

    private Integer code;
    private String messaeg;
    private String business;
    private ServiceExceptionCategory serviceExceptionCategory;
    private HttpExceptionCategory httpExceptionCategory;
    private HttpStatus httpStatus;
    Device_ErrorsEnum(Integer code, String business, String message, ServiceExceptionCategory serviceExceptionCategory, HttpExceptionCategory httpExceptionCategory, HttpStatus httpStatus) {
        this.code = code;
        this.business = business;
        this.messaeg = message;
        this.serviceExceptionCategory = serviceExceptionCategory;
        this.httpExceptionCategory = httpExceptionCategory;
        this.httpStatus = httpStatus;
    }
    @Override
    public Integer getCode() {
        return code;
    }
    @Override
    public String getBusiness() {
        return business;
    }
    @Override
    public String getMessage() {
        return messaeg;
    }
    @Override
    public ServiceExceptionCategory getServiceExceptionCategory() {
        return serviceExceptionCategory;
    }
    @Override
    public HttpExceptionCategory getHttpExceptionCategory() {
        return httpExceptionCategory;
    }
    @Override
    public HttpStatus getHttpStatus() {
        return httpStatus;
    }
    @Override
    public void setMessage(String message) {
        this.messaeg = message;
    }

    public static Device_ErrorsEnum getEnumByName(String name) {
        if (StringUtils.isEmpty(name)) return null;
        for (Device_ErrorsEnum errorsEnum : Device_ErrorsEnum.values()) {
            if (errorsEnum.name().equals(name)) {
                return errorsEnum;
            }
        }
        return null;
    }
}

